<template>
  <section>
    <p>{{message}}</p>
    <button v-on:click="reverseMessage($event)">逆转消息</button>
  </section>
</template>

<script>
export default {
  name: "Event",
  data() {
    return { message: "Hello Vue!" };
  },
  methods: {
    reverseMessage() {
      this.message = this.message
        .split("")
        .reverse()
        .join("");
    }
  }
};
</script>
